﻿using System;
using System.Collections.Generic;
using System.Text;
using com.lover.astd.common.logic;
using com.lover.astd.common.model.enumer;

namespace com.lover.astd.common.logicexe.activities
{
    public class FestivalEventExe : ExeBase
    {
        public FestivalEventExe() { _name = ConfigStrings.S_FestivalEvent; _readable = ConfigStrings.SR_FestivalEvent; }
        public override long execute()
        {
            ActivityMgr mgr = ServiceFactory.getActivityManager();

            Dictionary<string, string> conf = getConfig();
            if (!conf.ContainsKey(ConfigStrings.enabled) || !conf[ConfigStrings.enabled].ToLower().Equals("true")) return an_hour_later();
            int result_get = mgr.handleFestivalEventInfo(_proto, _logger);
            int result_visit = 10;// mgr.handleFestivalEventVisitInfo(_proto, _logger);
            if (result_get == 10 && result_visit == 10) return next_day();
            return next_hour();
        }
    }
}
